"; echo ""; }else{ echo ""; echo ""; } $bcon = connectdb(); if (!$bcon) { if($mime== WEB) { echo dberror($mime); }else{ echo dberror($mime); } } $getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'")); $uth = $getuthm[0]; if(!$uth=="") { $uthm = "$uth"; }else{ $uthm = "default.css"; } $action = $_GET["action"]; $page = $_GET["page"]; $who = $_GET["who"]; $brws = explode(" ",$HTTP_USER_AGENT); $ubr = $brws[0]; $uip = getip(); if((islogged($ses)==false)||($uid==0)) { if($mime== WEB) { echo notlogged($mime); }else{ echo notlogged($mime); } } if(isipbanned($uip,$ubr)) { if(!isshield(getuid_ses($ses))) { if($mime== WEB) { echo useripbanned($mime,$uip,$ubr); }else{ echo useripbanned($mime,$uip,$ubr); } } } //echo isbanned($uid); if(isbanned($uid)) { if($mime== WEB) { echo userbanned($mime,$uid); }else{ echo userbanned($mime,$uid); } } if($action=="newtopic") { $fid = $_POST["fid"]; $ntitle = $_POST["ntitle"]; $tpctxt = $_POST["tpctxt"]; if(!canaccess(getuid_ses($ses), $fid)) { if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; echo "You Don't Have A Permission To View The Contents Of This Forum

"; echo "Home"; echo "

"; echo webfoot(); exit(); }else{ echo waphead($stitle); echo "

"; echo "You Don't Have A Permission To View The Contents Of This Forum

"; echo "Home"; echo "

"; echo wapfoot(); exit(); } } addonline(getuid_ses($ses),"Created New Topic",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $texst = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE name LIKE '".$ntitle."' AND fid='".$fid."'")); if($texst[0]==0) { $res = false; $ltopic = mysql_fetch_array(mysql_query("SELECT crdate FROM ibwf_topics WHERE authorid='".$uid."' ORDER BY crdate DESC LIMIT 1")); $topic_af = gettopicaf(); $antiflood = time()-$ltopic[0]; if($antiflood>$topic_af) { if((trim($ntitle)!="")||(trim($tpctxt)!="")) { $res = mysql_query("INSERT INTO ibwf_topics SET name='".$ntitle."', fid='".$fid."', authorid='".$uid."', text='".$tpctxt."', crdate='".$crdate."', lastpost='".$crdate."'"); } if($res) { $usts = mysql_fetch_array(mysql_query("SELECT posts, credits FROM ibwf_users WHERE id='".$uid."'")); $ups = $usts[0]+1; $upl = $usts[1]+1; mysql_query("UPDATE ibwf_users SET posts='".$ups."', credits='".$upl."' WHERE id='".$uid."'"); $tnm = htmlspecialchars($ntitle); echo "\"O\"/Topic $tnm Created Successfully"; $tid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_topics WHERE name='".$ntitle."' AND fid='".$fid."'")); echo "

"; echo "View Topic"; }else{ echo "\"X\"/Error Creating New Thread"; } }else{ $af = $topic_af -$antiflood; echo "\"X\"/Antiflood Control: $af"; } }else{ echo "\"X\"/Topic Name already Exist"; } $fname = getfname($fid); echo "

"; echo "$fname
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $texst = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE name LIKE '".$ntitle."' AND fid='".$fid."'")); if($texst[0]==0) { $res = false; $ltopic = mysql_fetch_array(mysql_query("SELECT crdate FROM ibwf_topics WHERE authorid='".$uid."' ORDER BY crdate DESC LIMIT 1")); $topic_af = gettopicaf(); $antiflood = time()-$ltopic[0]; if($antiflood>$topic_af) { if((trim($ntitle)!="")||(trim($tpctxt)!="")) { $res = mysql_query("INSERT INTO ibwf_topics SET name='".$ntitle."', fid='".$fid."', authorid='".$uid."', text='".$tpctxt."', crdate='".$crdate."', lastpost='".$crdate."'"); } if($res) { $usts = mysql_fetch_array(mysql_query("SELECT posts, credits FROM ibwf_users WHERE id='".$uid."'")); $ups = $usts[0]+1; $upl = $usts[1]+1; mysql_query("UPDATE ibwf_users SET posts='".$ups."', credits='".$upl."' WHERE id='".$uid."'"); $tnm = htmlspecialchars($ntitle); echo "\"O\"/Topic $tnm Created Successfully"; $tid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_topics WHERE name='".$ntitle."' AND fid='".$fid."'")); echo "

"; echo "View Topic"; }else{ echo "\"X\"/Error Creating New Thread"; } }else{ $af = $topic_af -$antiflood; echo "\"X\"/Antiflood Control: $af"; } }else{ echo "\"X\"/Topic Name already Exist"; } $fname = getfname($fid); echo "

"; echo "$fname
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="post") { $tid = $_POST["tid"]; $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'")); if(!canaccess(getuid_ses($ses), $tfid[0])) { if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; echo "You Don't Have A Permission To View The Contents Of This Forum

"; echo "Home"; echo "

"; echo webfoot(); exit(); }else{ echo waphead($stitle); echo "

"; echo "You Don't Have A Permission To View The Contents Of This Forum

"; echo "Home"; echo "

"; echo wapfoot(); exit(); } } $reptxt = $_POST["reptxt"]; $qut = $_POST["qut"]; addonline(getuid_ses($ses),"Posted A reply",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $crdate = time(); $fid = getfid($tid); //$uid = getuid_ses($ses); $res = false; $closed = mysql_fetch_array(mysql_query("SELECT closed FROM ibwf_topics WHERE id='".$tid."'")); if(($closed[0]!='1')||(ismod($uid))) { $lpost = mysql_fetch_array(mysql_query("SELECT dtpost FROM ibwf_posts WHERE uid='".$uid."' ORDER BY dtpost DESC LIMIT 1")); $post_af = getpostaf(); $antiflood = time()-$lpost[0]; if($antiflood>$post_af) { if(trim($reptxt)!="") { $res = mysql_query("INSERT INTO ibwf_posts SET text='".$reptxt."', tid='".$tid."', uid='".$uid."', dtpost='".$crdate."', quote='".$qut."'"); } if($res) { $usts = mysql_fetch_array(mysql_query("SELECT posts, credits FROM ibwf_users WHERE id='".$uid."'")); $ups = $usts[0]+1; $upl = $usts[1]+1; mysql_query("UPDATE ibwf_users SET posts='".$ups."', credits='".$upl."' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_topics SET lastpost='".$crdate."' WHERE id='".$tid."'"); echo "\"O\"/Message Posted Successfully"; echo "

"; echo "View Topic"; }else{ echo "\"X\"/Error Posting Message"; } }else{ $af = $post_af -$antiflood; echo "\"X\"/Antiflood Control: $af"; } }else{ echo "\"X\"/Topic is closed for posting"; } $fname = getfname($fid); echo "

"; echo "$fname
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $crdate = time(); $fid = getfid($tid); //$uid = getuid_ses($ses); $res = false; $closed = mysql_fetch_array(mysql_query("SELECT closed FROM ibwf_topics WHERE id='".$tid."'")); if(($closed[0]!='1')||(ismod($uid))) { $lpost = mysql_fetch_array(mysql_query("SELECT dtpost FROM ibwf_posts WHERE uid='".$uid."' ORDER BY dtpost DESC LIMIT 1")); $post_af = getpostaf(); $antiflood = time()-$lpost[0]; if($antiflood>$post_af) { if(trim($reptxt)!="") { $res = mysql_query("INSERT INTO ibwf_posts SET text='".$reptxt."', tid='".$tid."', uid='".$uid."', dtpost='".$crdate."', quote='".$qut."'"); } if($res) { $usts = mysql_fetch_array(mysql_query("SELECT posts, credits FROM ibwf_users WHERE id='".$uid."'")); $ups = $usts[0]+1; $upl = $usts[1]+1; mysql_query("UPDATE ibwf_users SET posts='".$ups."', credits='".$upl."' WHERE id='".$uid."'"); mysql_query("UPDATE ibwf_topics SET lastpost='".$crdate."' WHERE id='".$tid."'"); echo "\"O\"/Message Posted Successfully"; echo "

"; echo "View Topic"; }else{ echo "\"X\"/Error Posting Message"; } }else{ $af = $post_af -$antiflood; echo "\"X\"/Antiflood Control: $af"; } }else{ echo "\"X\"/Topic is closed for posting"; } $fname = getfname($fid); echo "

"; echo "$fname
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if ($action=="uadd") { $ucon = $_POST["ucon"]; $ucit = $_POST["ucit"]; $ustr = $_POST["ustr"]; $utzn = $_POST["utzn"]; $uphn = $_POST["uphn"]; addonline(getuid_ses($ses),"My Address",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET country='".$ucon."', city='".$ucit."', street='".$ustr."', timezone='".$utzn."', phoneno='".$uphn."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Address Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', country='".$ucon."', city='".$ucit."', street='".$ustr."', timezone='".$utzn."', phoneno='".$uphn."'"); if($res) { echo "\"O\"/Address Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET country='".$ucon."', city='".$ucit."', street='".$ustr."', timezone='".$utzn."', phoneno='".$uphn."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Address Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', country='".$ucon."', city='".$ucit."', street='".$ustr."', timezone='".$utzn."', phoneno='".$uphn."'"); if($res) { echo "\"O\"/Address Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="gcp") { $clid = $_GET["clid"]; $who = $_GET["who"]; $giv = $_POST["giv"]; $pnt = $_POST["pnt"]; addonline(getuid_ses($ses),"Moderating Club Member",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "
"; $whnick = getnick_uid($who); echo "$whnick"; echo "
"; echo "

"; $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."' AND clid=".$clid."")); $cow = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."' AND id=".$clid."")); if($exs[0]>0 && $cow[0]>0) { $mpt = mysql_fetch_array(mysql_query("SELECT points FROM ibwf_clubmembers WHERE uid='".$who."' AND clid='".$clid."'")); if($giv=="1") { $pnt = $mpt[0]+$pnt; }else{ $pnt = $mpt[0]-$pnt; if($pnt<0)$pnt=0; } $res = mysql_query("UPDATE ibwf_clubmembers SET points='".$pnt."' WHERE uid='".$who."' AND clid='".$clid."'"); if($res) { echo "\"O\"/Club points updated successfully!"; }else{ echo "\"X\"/Database Error!"; } }else{ echo "\"X\"/Missing Info!"; } echo "

"; echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $whnick = getnick_uid($who); echo "$whnick"; echo "

"; echo "

"; $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."' AND clid=".$clid."")); $cow = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."' AND id=".$clid."")); if($exs[0]>0 && $cow[0]>0) { $mpt = mysql_fetch_array(mysql_query("SELECT points FROM ibwf_clubmembers WHERE uid='".$who."' AND clid='".$clid."'")); if($giv=="1") { $pnt = $mpt[0]+$pnt; }else{ $pnt = $mpt[0]-$pnt; if($pnt<0)$pnt=0; } $res = mysql_query("UPDATE ibwf_clubmembers SET points='".$pnt."' WHERE uid='".$who."' AND clid='".$clid."'"); if($res) { echo "\"O\"/Club points updated successfully!"; }else{ echo "\"X\"/Database Error!"; } }else{ echo "\"X\"/Missing Info!"; } echo "

"; echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="gpl") { $clid = $_GET["clid"]; $who = $_GET["who"]; $pnt = $_POST["pnt"]; addonline(getuid_ses($ses),"Moderating Club Member",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $whnick = getnick_uid($who); echo "$whnick"; echo "

"; echo "

"; echo "\"X\"/Because people misused the credits thing, clubs owners cant give credits anymore"; echo "

"; echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $whnick = getnick_uid($who); echo "$whnick"; echo "

"; echo "

"; echo "\"X\"/Because people misused the credits thing, clubs owners cant give credits anymore"; echo "

"; echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if ($action=="upre") { $usds = $_POST["usds"]; $usds = str_replace('"', "", $usds); $usds = str_replace("'", "", $usds); $ubon = $_POST["ubon"]; $usxp = $_POST["usxp"]; addonline(getuid_ses($ses),"Preferences",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET sitedscr='".$usds."', budsonly='".$ubon."', sexpre='".$usxp."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Preferences Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', sitedscr='".$usds."', budsonly='".$ubon."', sexpre='".$usxp."'"); if($res) { echo "\"O\"/Preferences Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET sitedscr='".$usds."', budsonly='".$ubon."', sexpre='".$usxp."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Preferences Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', sitedscr='".$usds."', budsonly='".$ubon."', sexpre='".$usxp."'"); if($res) { echo "\"O\"/Preferences Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if ($action=="uper") { $uhig = $_POST["uhig"]; $uwgt = $_POST["uwgt"]; $urln = $_POST["urln"]; $ueor = $_POST["ueor"]; $ueys = $_POST["ueys"]; $uher = $_POST["uher"]; $upro = $_POST["upro"]; addonline(getuid_ses($ses),"Personality",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET height='".$uhig."', weight='".$uwgt."', realname='".$urln."', eyescolor='".$ueys."', profession='".$upro."', racerel='".$ueor."',hairtype='".$uher."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Personal Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', height='".$uhig."', weight='".$uwgt."', realname='".$urln."', eyescolor='".$ueys."', profession='".$upro."', racerel='".$ueor."',hairtype='".$uher."'"); if($res) { echo "\"O\"/Personal Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET height='".$uhig."', weight='".$uwgt."', realname='".$urln."', eyescolor='".$ueys."', profession='".$upro."', racerel='".$ueor."',hairtype='".$uher."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Personal Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', height='".$uhig."', weight='".$uwgt."', realname='".$urln."', eyescolor='".$ueys."', profession='".$upro."', racerel='".$ueor."',hairtype='".$uher."'"); if($res) { echo "\"O\"/Personal Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if ($action=="umin") { $ulik = $_POST["ulik"]; $ulik = str_replace('"', "", $ulik); $ulik = str_replace("'", "", $ulik); $udlk = $_POST["udlk"]; $udlk = str_replace('"', "", $udlk); $udlk = str_replace("'", "", $udlk); $ubht = $_POST["ubht"]; $ubht = str_replace('"', "", $ubht); $ubht = str_replace("'", "", $ubht); $ught = $_POST["ught"]; $ught = str_replace('"', "", $ught); $ught = str_replace("'", "", $ught); $ufsp = $_POST["ufsp"]; $ufsp = str_replace('"', "", $ufsp); $ufsp = str_replace("'", "", $ufsp); $ufmc = $_POST["ufmc"]; $ufmc = str_replace('"', "", $ufmc); $ufmc = str_replace("'", "", $ufmc); $umtx = $_POST["umtx"]; $umtx = str_replace('"', "", $umtx); $umtx = str_replace("'", "", $umtx); addonline(getuid_ses($ses),"More about me",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET likes='".$ulik."', deslikes='".$udlk."', habitsb='".$ubht."', habitsg='".$ught."', favsport='".$ufsp."', favmusic='".$ufmc."',moretext='".$umtx."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', likes='".$ulik."', deslikes='".$udlk."', habitsb='".$ubht."', habitsg='".$ught."', favsport='".$ufsp."', favmusic='".$ufmc."',moretext='".$umtx."'"); if($res) { echo "\"O\"/Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_xinfo WHERE uid='".$uid."'")); if($exs[0]>0) { $res = mysql_query("UPDATE ibwf_xinfo SET likes='".$ulik."', deslikes='".$udlk."', habitsb='".$ubht."', habitsg='".$ught."', favsport='".$ufsp."', favmusic='".$ufmc."',moretext='".$umtx."' WHERE uid='".$uid."'"); if($res) { echo "\"O\"/Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } }else{ $res = mysql_query("INSERT INTO ibwf_xinfo SET uid='".$uid."', likes='".$ulik."', deslikes='".$udlk."', habitsb='".$ubht."', habitsg='".$ught."', favsport='".$ufsp."', favmusic='".$ufmc."',moretext='".$umtx."'"); if($res) { echo "\"O\"/Info Updated Successfully

"; }else{ echo "\"O\"/Database Error!

"; } } echo ""; echo "Extended Settings
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="mkroom") { $rname = mysql_escape_string($_POST["rname"]); $rpass = trim($_POST["rpass"]); addonline(getuid_ses($ses),"Creating Chatroom",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if ($rpass=="") { $cns = 1; }else{ $cns = 0; } $prooms = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE static='0'")); if($prooms[0]<10) { $res = mysql_query("INSERT INTO ibwf_rooms SET name='".$rname."', pass='".$rpass."', censord='".$cns."', static='0', lastmsg='".time()."'"); if($res) { echo "\"O\"/Room created successfully

"; }else{ echo "\"X\"/Database Error!

"; } }else{ echo "\"X\"/There's already 10 users rooms

"; } echo "\"*\"/Chatrooms
"; echo "\"*\"/Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if ($rpass=="") { $cns = 1; }else{ $cns = 0; } $prooms = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE static='0'")); if($prooms[0]<10) { $res = mysql_query("INSERT INTO ibwf_rooms SET name='".$rname."', pass='".$rpass."', censord='".$cns."', static='0', lastmsg='".time()."'"); if($res) { echo "\"O\"/Room created successfully

"; }else{ echo "\"X\"/Database Error!

"; } }else{ echo "\"X\"/There's already 10 users rooms

"; } echo "\"*\"/Chatrooms
"; echo "\"*\"/Home"; echo "

"; echo wapfoot(); } } else if($action=="signgb") { $who = $_POST["who"]; if(!cansigngb(getuid_ses($ses), $who)) { if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; echo "You cant Sign this user guestbook

"; echo "Home"; echo "

"; echo webfoot(); exit(); }else{ echo waphead($stitle); echo "

"; echo "You cant Sign this user guestbook

"; echo "Home"; echo "

"; echo wapfoot(); exit(); } } $msgtxt = $_POST["msgtxt"]; //$qut = $_POST["qut"]; addonline(getuid_ses($ses),"Signing a guestbook",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $res = false; if(trim($msgtxt)!="") { $res = mysql_query("INSERT INTO ibwf_gbook SET gbowner='".$who."', gbsigner='".$uid."', dtime='".$crdate."', gbmsg='".$msgtxt."'"); } if($res) { echo "\"O\"/Message Posted Successfully"; }else{ echo "\"X\"/Error Posting Message"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $res = false; if(trim($msgtxt)!="") { $res = mysql_query("INSERT INTO ibwf_gbook SET gbowner='".$who."', gbsigner='".$uid."', dtime='".$crdate."', gbmsg='".$msgtxt."'"); } if($res) { echo "\"O\"/Message Posted Successfully"; }else{ echo "\"X\"/Error Posting Message"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="votepl") { //$uid = getuid_ses($ses); $plid = $_GET["plid"]; $ans = $_GET["ans"]; addonline(getuid_ses($ses),"Poll Voting ;)",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $voted = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE uid='".$uid."' AND pid='".$plid."'")); if($voted[0]==0) { $res = mysql_query("INSERT INTO ibwf_presults SET uid='".$uid."', pid='".$plid."', ans='".$ans."'"); if($res) { echo "\"o\"/Thanx for your voting"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/You already voted for this poll"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $voted = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE uid='".$uid."' AND pid='".$plid."'")); if($voted[0]==0) { $res = mysql_query("INSERT INTO ibwf_presults SET uid='".$uid."', pid='".$plid."', ans='".$ans."'"); if($res) { echo "\"o\"/Thanx for your voting"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/You already voted for this poll"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="dlpoll") { //$uid = getuid_ses($ses); addonline(getuid_ses($ses),"Deleting Poll",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$uid."'")); $res = mysql_query("UPDATE ibwf_users SET pollid='0' WHERE id='".$uid."'"); if($res) { $res = mysql_query("DELETE FROM ibwf_presults WHERE pid='".$pid[0]."'"); $res = mysql_query("DELETE FROM ibwf_pp_pres WHERE pid='".$pid[0]."'"); $res = mysql_query("DELETE FROM ibwf_polls WHERE id='".$pid[0]."'"); echo "\"o\"/Poll Deleted"; }else{ echo "\"x\"/Database Error!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$uid."'")); $res = mysql_query("UPDATE ibwf_users SET pollid='0' WHERE id='".$uid."'"); if($res) { $res = mysql_query("DELETE FROM ibwf_presults WHERE pid='".$pid[0]."'"); $res = mysql_query("DELETE FROM ibwf_pp_pres WHERE pid='".$pid[0]."'"); $res = mysql_query("DELETE FROM ibwf_polls WHERE id='".$pid[0]."'"); echo "\"o\"/Poll Deleted"; }else{ echo "\"x\"/Database Error!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="delan") { //$uid = getuid_ses($ses); addonline(getuid_ses($ses),"Deleting Announcement",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_announcements WHERE id='".$anid."' AND clid='".$clid."'")); if(($uid==$pid[0])&&($exs[0]>0)) { $res = mysql_query("DELETE FROM ibwf_announcements WHERE id='".$anid."'"); if($res) { echo "\"o\"/Announcement Deleted"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/Yo can't delete this announcement!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); $exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_announcements WHERE id='".$anid."' AND clid='".$clid."'")); if(($uid==$pid[0])&&($exs[0]>0)) { $res = mysql_query("DELETE FROM ibwf_announcements WHERE id='".$anid."'"); if($res) { echo "\"o\"/Announcement Deleted"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/Yo can't delete this announcement!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="dlcl") { //$uid = getuid_ses($ses); addonline(getuid_ses($ses),"Deleting Club",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($uid==$pid[0]) { $res = deleteClub($clid); if($res) { echo "\"o\"/Club Deleted"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/Yo can't delete this club!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($uid==$pid[0]) { $res = deleteClub($clid); if($res) { echo "\"o\"/Club Deleted"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/Yo can't delete this club!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="dltpl") { //$uid = getuid_ses($ses); $tid = $_GET["tid"]; addonline(getuid_ses($ses),"Deleting Poll",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'")); $res = mysql_query("UPDATE ibwf_topics SET pollid='0' WHERE id='".$tid."'"); if($res) { $res = mysql_query("DELETE FROM ibwf_presults WHERE pid='".$pid[0]."'"); $res = mysql_query("DELETE FROM ibwf_polls WHERE id='".$pid[0]."'"); echo "\"o\"/Poll Deleted"; }else{ echo "\"x\"/Database Error!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'")); $res = mysql_query("UPDATE ibwf_topics SET pollid='0' WHERE id='".$tid."'"); if($res) { $res = mysql_query("DELETE FROM ibwf_presults WHERE pid='".$pid[0]."'"); $res = mysql_query("DELETE FROM ibwf_polls WHERE id='".$pid[0]."'"); echo "\"o\"/Poll Deleted"; }else{ echo "\"x\"/Database Error!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="reqjc") { //$uid = getuid_ses($ses); $clid = $_GET["clid"]; addonline(getuid_ses($ses),"Joining A Club",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $isin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'")); if($isin[0]==0){ $res = mysql_query("INSERT INTO ibwf_clubmembers SET uid='".$uid."', clid='".$clid."', accepted='0', points='0', joined='".time()."'"); if($res) { echo "\"o\"/Request sent! the club owner should accept your request"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/You already in this club or request sent and waiting for acception"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $isin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'")); if($isin[0]==0){ $res = mysql_query("INSERT INTO ibwf_clubmembers SET uid='".$uid."', clid='".$clid."', accepted='0', points='0', joined='".time()."'"); if($res) { echo "\"o\"/Request sent! the club owner should accept your request"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/You already in this club or request sent and waiting for acception"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="unjc") { //$uid = getuid_ses($ses); $clid = $_GET["clid"]; addonline(getuid_ses($ses),"Unjoining club",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $isin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'")); if($isin[0]>0){ $res = mysql_query("DELETE FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'"); if($res) { echo "\"o\"/Unjoined club successfully"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/You're not a member of this club!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $isin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'")); if($isin[0]>0){ $res = mysql_query("DELETE FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'"); if($res) { echo "\"o\"/Unjoined club successfully"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/You're not a member of this club!"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="acm") { //$uid = getuid_ses($ses); $clid = $_GET["clid"]; addonline(getuid_ses($ses),"Adding a member to club",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("UPDATE ibwf_clubmembers SET accepted='1' WHERE clid='".$clid."' AND uid='".$who."'"); if($res) { echo "\"o\"/Member added to your club"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("UPDATE ibwf_clubmembers SET accepted='1' WHERE clid='".$clid."' AND uid='".$who."'"); if($res) { echo "\"o\"/Member added to your club"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="accall") { //$uid = getuid_ses($ses); $clid = $_GET["clid"]; addonline(getuid_ses($ses),"Adding a member to club",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("UPDATE ibwf_clubmembers SET accepted='1' WHERE clid='".$clid."'"); if($res) { echo "\"o\"/All Members Accepted"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("UPDATE ibwf_clubmembers SET accepted='1' WHERE clid='".$clid."'"); if($res) { echo "\"o\"/All Members Accepted"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="denall") { //$uid = getuid_ses($ses); $clid = $_GET["clid"]; addonline(getuid_ses($ses),"Adding a member to club",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("DELETE FROM ibwf_clubmembers WHERE accepted='0' AND clid='".$clid."'"); if($res) { echo "\"o\"/All Members Denied"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("DELETE FROM ibwf_clubmembers WHERE accepted='0' AND clid='".$clid."'"); if($res) { echo "\"o\"/All Members Denied"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="dcm") { //$uid = getuid_ses($ses); $clid = $_GET["clid"]; $who = $_GET["who"]; addonline(getuid_ses($ses),"Deleting a member from club",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("DELETE FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".$who."'"); if($res) { echo "\"o\"/Member deleted from your club"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); if($cowner[0]==$uid){ $res = mysql_query("DELETE FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".$who."'"); if($res) { echo "\"o\"/Member deleted from your club"; }else{ echo "\"x\"/Database Error!"; } }else{ echo "\"x\"/This club ain't yours"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="crpoll") { addonline(getuid_ses($ses),"Creating Poll",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); if(getcredits(getuid_ses($ses))>=50) { $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$uid."'")); if($pid[0] == 0) { $pques = $_POST["pques"]; $opt1 = $_POST["opt1"]; $opt2 = $_POST["opt2"]; $opt3 = $_POST["opt3"]; $opt4 = $_POST["opt4"]; $opt5 = $_POST["opt5"]; if((trim($pques)!="")&&(trim($opt1)!="")&&(trim($opt2)!="")) { $pex = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_polls WHERE pqst LIKE '".$pques."'")); if($pex[0]==0) { $res = mysql_query("INSERT INTO ibwf_polls SET pqst='".$pques."', opt1='".$opt1."', opt2='".$opt2."', opt3='".$opt3."', opt4='".$opt4."', opt5='".$opt5."', pdt='".time()."'"); if($res) { $pollid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_polls WHERE pqst='".$pques."' ")); mysql_query("UPDATE ibwf_users SET pollid='".$pollid[0]."' WHERE id='".$uid."'"); echo "\"O\"/Your poll created successfully"; }else{ echo "\"x\"/Database Eroor!"; } }else{ echo "\"x\"/There's already a poll with the same question"; } }else{ echo "\"x\"/The poll must have a question, and at least 2 options"; } }else{ echo "\"x\"/You already have a poll"; } }else{ echo "\"x\"/You should have at least 50 credits to create a poll"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); if(getcredits(getuid_ses($ses))>=50) { $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$uid."'")); if($pid[0] == 0) { $pques = $_POST["pques"]; $opt1 = $_POST["opt1"]; $opt2 = $_POST["opt2"]; $opt3 = $_POST["opt3"]; $opt4 = $_POST["opt4"]; $opt5 = $_POST["opt5"]; if((trim($pques)!="")&&(trim($opt1)!="")&&(trim($opt2)!="")) { $pex = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_polls WHERE pqst LIKE '".$pques."'")); if($pex[0]==0) { $res = mysql_query("INSERT INTO ibwf_polls SET pqst='".$pques."', opt1='".$opt1."', opt2='".$opt2."', opt3='".$opt3."', opt4='".$opt4."', opt5='".$opt5."', pdt='".time()."'"); if($res) { $pollid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_polls WHERE pqst='".$pques."' ")); mysql_query("UPDATE ibwf_users SET pollid='".$pollid[0]."' WHERE id='".$uid."'"); echo "\"O\"/Your poll created successfully"; }else{ echo "\"x\"/Database Eroor!"; } }else{ echo "\"x\"/There's already a poll with the same question"; } }else{ echo "\"x\"/The poll must have a question, and at least 2 options"; } }else{ echo "\"x\"/You already have a poll"; } }else{ echo "\"x\"/You should have at least 50 credits to create a poll"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="pltpc") { $tid = $_GET["tid"]; addonline(getuid_ses($ses),"Creating Poll",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); if((getcredits(getuid_ses($ses))>=500)||ismod($uid)) { $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'")); if($pid[0] == 0) { $pques = $_POST["pques"]; $opt1 = $_POST["opt1"]; $opt2 = $_POST["opt2"]; $opt3 = $_POST["opt3"]; $opt4 = $_POST["opt4"]; $opt5 = $_POST["opt5"]; if((trim($pques)!="")&&(trim($opt1)!="")&&(trim($opt2)!="")) { $pex = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_polls WHERE pqst LIKE '".$pques."'")); if($pex[0]==0) { $res = mysql_query("INSERT INTO ibwf_polls SET pqst='".$pques."', opt1='".$opt1."', opt2='".$opt2."', opt3='".$opt3."', opt4='".$opt4."', opt5='".$opt5."', pdt='".time()."'"); if($res) { $pollid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_polls WHERE pqst='".$pques."' ")); mysql_query("UPDATE ibwf_topics SET pollid='".$pollid[0]."' WHERE id='".$tid."'"); echo "\"O\"/Your poll created successfully"; }else{ echo "\"x\"/Database Eroor!"; } }else{ echo "\"x\"/There's already a poll with the same question"; } }else{ echo "\"x\"/The poll must have a question, and at least 2 options"; } }else{ echo "\"x\"/This Topic Already Have A poll"; } }else{ echo "\"x\"/You should have at least 500 credits to create a poll"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); if((getcredits(getuid_ses($ses))>=500)||ismod($uid)) { $pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'")); if($pid[0] == 0) { $pques = $_POST["pques"]; $opt1 = $_POST["opt1"]; $opt2 = $_POST["opt2"]; $opt3 = $_POST["opt3"]; $opt4 = $_POST["opt4"]; $opt5 = $_POST["opt5"]; if((trim($pques)!="")&&(trim($opt1)!="")&&(trim($opt2)!="")) { $pex = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_polls WHERE pqst LIKE '".$pques."'")); if($pex[0]==0) { $res = mysql_query("INSERT INTO ibwf_polls SET pqst='".$pques."', opt1='".$opt1."', opt2='".$opt2."', opt3='".$opt3."', opt4='".$opt4."', opt5='".$opt5."', pdt='".time()."'"); if($res) { $pollid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_polls WHERE pqst='".$pques."' ")); mysql_query("UPDATE ibwf_topics SET pollid='".$pollid[0]."' WHERE id='".$tid."'"); echo "\"O\"/Your poll created successfully"; }else{ echo "\"x\"/Database Eroor!"; } }else{ echo "\"x\"/There's already a poll with the same question"; } }else{ echo "\"x\"/The poll must have a question, and at least 2 options"; } }else{ echo "\"x\"/This Topic Already Have A poll"; } }else{ echo "\"x\"/You should have at least 500 credits to create a poll"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="addblg") { if(!getcredits(getuid_ses($ses))>50) { if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; echo "Only 50+ credits can add blogs

"; echo "Home"; echo "

"; echo webfoot(); exit(); }else{ echo waphead($stitle); echo "

"; echo "Only 50+ credits can add blogs

"; echo "Home"; echo "

"; echo wapfoot(); exit(); } } $msgtxt = $_POST["btitle"]; $msgtxt = $_POST["msgtxt"]; //$qut = $_POST["qut"]; addonline(getuid_ses($ses),"Adding a blog",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $res = false; if((trim($msgtxt)!="")&&(trim($btitle)!="")) { $res = mysql_query("INSERT INTO ibwf_blogs SET bowner='".$uid."', bname='".$btitle."', bgdate='".$crdate."', btext='".$msgtxt."'"); } if($res) { echo "\"O\"/Message Posted Successfully"; }else{ echo "\"X\"/Error Posting Message"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $res = false; if((trim($msgtxt)!="")&&(trim($btitle)!="")) { $res = mysql_query("INSERT INTO ibwf_blogs SET bowner='".$uid."', bname='".$btitle."', bgdate='".$crdate."', btext='".$msgtxt."'"); } if($res) { echo "\"O\"/Message Posted Successfully"; }else{ echo "\"X\"/Error Posting Message"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="addvlt") { if(!getcredits(getuid_ses($ses))>24) { if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; echo "Only 25+ credits can add a vault item

"; echo "Home"; echo "

"; echo webfoot(); exit(); }else{ echo waphead($stitle); echo "

"; echo "Only 25+ credits can add a vault item

"; echo "Home"; echo "

"; echo wapfoot(); exit(); } } $viname = $_POST["viname"]; $vilink = $_POST["vilink"]; //$qut = $_POST["qut"]; addonline(getuid_ses($ses),"Adding a vault item",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $res = false; if((trim($vilink)!="")&&(trim($viname)!="")) { $res = mysql_query("INSERT INTO ibwf_vault SET uid='".$uid."', title='".mysql_escape_string($viname)."', pudt='".$crdate."', itemurl='".$vilink."'"); } if($res) { echo "\"O\"/Item added Successfully"; }else{ echo "\"X\"/Error adding an item"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $crdate = time(); //$uid = getuid_ses($ses); $res = false; if((trim($vilink)!="")&&(trim($viname)!="")) { $res = mysql_query("INSERT INTO ibwf_vault SET uid='".$uid."', title='".mysql_escape_string($viname)."', pudt='".$crdate."', itemurl='".$vilink."'"); } if($res) { echo "\"O\"/Item added Successfully"; }else{ echo "\"X\"/Error adding an item"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="shout") { $uid = getuid_ses($ses); $shtxt = $_POST["shtxt"]; addonline(getuid_ses($ses),"Shouting",""); $wiz = mysql_fetch_array(mysql_query("SELECT credits FROM ibwf_users WHERE id='".$uid."'")); $credits = $wiz[0] - 1; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if(getcredits(getuid_ses($ses))<75) { echo "\"X\"/You should have at least 75 credits to shout!"; }else{ $shtxt = $shtxt; $shtm = time(); $res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'"); if($res) { $shts = mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'")); $shts = $shts[0]+1; mysql_query("UPDATE ibwf_users SET shouts='".$shts."', credits='".$credits."' WHERE id='".$uid."'"); echo "\"O\"/Shout added successfully"; }else{ echo "\"X\"/Database Error"; } } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if(getcredits(getuid_ses($ses))<75) { echo "\"X\"/You should have at least 75 credits to shout!"; }else{ $shtxt = $shtxt; //$uid = getuid_ses($ses); $shtm = time(); $res = mysql_query("INSERT INTO ibwf_shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'"); if($res) { $shts = mysql_fetch_array(mysql_query("SELECT shouts from ibwf_users WHERE id='".$uid."'")); $shts = $shts[0]+1; mysql_query("UPDATE ibwf_users SET shouts='".$shts."', credits='".$credits."' WHERE id='".$uid."'"); echo "\"O\"/Shout added successfully"; }else{ echo "\"X\"/Database Error"; } } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="annc") { $antx = $_POST["antx"]; $clid = $_GET["clid"]; addonline(getuid_ses($ses),"Announcing",""); $cow = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'")); $uid = getuid_ses($ses); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if($cow[0]!=$uid) { echo "\"X\"/This is not your club!"; }else{ $shtxt = $shtxt; //$uid = getuid_ses($ses); $shtm = time(); $res = mysql_query("INSERT INTO ibwf_announcements SET antext='".$antx."', clid='".$clid."', antime='".$shtm."'"); if($res) { echo "\"O\"/Announcement Added!"; }else{ echo "\"X\"/Database Error"; } } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if($cow[0]!=$uid) { echo "\"X\"/This is not your club!"; }else{ $shtxt = $shtxt; //$uid = getuid_ses($ses); $shtm = time(); $res = mysql_query("INSERT INTO ibwf_announcements SET antext='".$antx."', clid='".$clid."', antime='".$shtm."'"); if($res) { echo "\"O\"/Announcement Added!"; }else{ echo "\"X\"/Database Error"; } } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="rateb") { $brate = $_POST["brate"]; $bid = $_GET["bid"]; addonline(getuid_ses($ses),"Rating a blog",""); //$uid = getuid_ses($ses); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $vb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_brate WHERE uid='".$uid."' AND blogid='".$bid."'")); if($vb[0]==0) { $res = mysql_query("INSERT INTO ibwf_brate SET uid='".$uid."', blogid='".$bid."', brate='".$brate."'"); if($res) { echo "\"o\"/Blog rated successfully
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"x\"/You have rated this blog before
"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $vb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_brate WHERE uid='".$uid."' AND blogid='".$bid."'")); if($vb[0]==0) { $res = mysql_query("INSERT INTO ibwf_brate SET uid='".$uid."', blogid='".$bid."', brate='".$brate."'"); if($res) { echo "\"o\"/Blog rated successfully
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"x\"/You have rated this blog before
"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="delfgb") { $mid = $_GET["mid"]; addonline(getuid_ses($ses),"Deleting GB Message",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if(candelgb(getuid_ses($ses), $mid)) { $res = mysql_query("DELETE FROM ibwf_gbook WHERE id='".$mid."'"); if($res) { echo "\"o\"/Message Deleted From Guestbook
"; }else{ echo "\";x\"/Database Error!
"; } }else{ echo "\"X\"/You can't delete this message"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if(candelgb(getuid_ses($ses), $mid)) { $res = mysql_query("DELETE FROM ibwf_gbook WHERE id='".$mid."'"); if($res) { echo "\"o\"/Message Deleted From Guestbook
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"X\"/You can't delete this message"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="delvlt") { $vid = $_GET["vid"]; addonline(getuid_ses($ses),"Deleting Vault Item",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $itemowner = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_vault WHERE id='".$vid."'")); if(ismod(getuid_ses($ses))||getuid_ses($ses)==$itemowner[0]) { $res = mysql_query("DELETE FROM ibwf_vault WHERE id='".$vid."'"); if($res) { echo "\"o\"/Item Deleted From Vault
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"X\"/You can't delete this item"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $itemowner = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_vault WHERE id='".$vid."'")); if(ismod(getuid_ses($ses))||getuid_ses($ses)==$itemowner[0]) { $res = mysql_query("DELETE FROM ibwf_vault WHERE id='".$vid."'"); if($res) { echo "\"o\"/Item Deleted From Vault
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"X\"/You can't delete this item"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="delbl") { $bid = $_GET["bid"]; addonline(getuid_ses($ses),"Deleting A Blog",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if(candelbl(getuid_ses($ses), $bid)) { $res = mysql_query("DELETE FROM ibwf_blogs WHERE id='".$bid."'"); if($res) { echo "\"o\"/Blog Deleted
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"X\"/You can't delete this blog"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if(candelbl(getuid_ses($ses), $bid)) { $res = mysql_query("DELETE FROM ibwf_blogs WHERE id='".$bid."'"); if($res) { echo "\"o\"/Blog Deleted
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"X\"/You can't delete this blog"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="rpost") { $pid = $_GET["pid"]; addonline(getuid_ses($ses),"Reporting Post",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $pinfo = mysql_fetch_array(mysql_query("SELECT reported FROM ibwf_posts WHERE id='".$pid."'")); if($pinfo[0]=="0") { $str = mysql_query("UPDATE ibwf_posts SET reported='1' WHERE id='".$pid."' "); if($str) { echo "\"O\"/Post reported to mods successfully"; }else{ echo "\"X\"/Can't report post at the moment"; } }else{ echo "\"X\"/This Post is already reported"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $pinfo = mysql_fetch_array(mysql_query("SELECT reported FROM ibwf_posts WHERE id='".$pid."'")); if($pinfo[0]=="0") { $str = mysql_query("UPDATE ibwf_posts SET reported='1' WHERE id='".$pid."' "); if($str) { echo "\"O\"/Post reported to mods successfully"; }else{ echo "\"X\"/Can't report post at the moment"; } }else{ echo "\"X\"/This Post is already reported"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="rtpc") { $tid = $_GET["tid"]; addonline(getuid_ses($ses),"Reporting Topic",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $pinfo = mysql_fetch_array(mysql_query("SELECT reported FROM ibwf_topics WHERE id='".$tid."'")); if($pinfo[0]=="0") { $str = mysql_query("UPDATE ibwf_topics SET reported='1' WHERE id='".$tid."' "); if($str) { echo "\"O\"/Topic reported to mods successfully"; }else{ echo "\"X\"/Can't report topic at the moment"; } }else{ echo "\"X\"/This Topic is already reported"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $pinfo = mysql_fetch_array(mysql_query("SELECT reported FROM ibwf_topics WHERE id='".$tid."'")); if($pinfo[0]=="0") { $str = mysql_query("UPDATE ibwf_topics SET reported='1' WHERE id='".$tid."' "); if($str) { echo "\"O\"/Topic reported to mods successfully"; }else{ echo "\"X\"/Can't report topic at the moment"; } }else{ echo "\"X\"/This Topic is already reported"; } echo "

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="bud") { $todo = $_GET["todo"]; $who = $_GET["who"]; addonline(getuid_ses($ses),"Adding/Removing Buddy",""); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $unick = getnick_uid($uid); $tnick = getnick_uid($who); if($todo=="add") { if(budres($uid,$who)!=3){ if(arebuds($uid,$who)) { echo "\"x\"/$tnick is already your buddy
"; }else if(budres($uid, $who)==0) { $res = mysql_query("INSERT INTO ibwf_buddies SET uid='".$uid."', tid='".$who."', reqdt='".time()."'"); if($res) { echo "\"o\"/A request has been sent to $tnick
"; }else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } } else if(budres($uid, $who)==1) { $res = mysql_query("UPDATE ibwf_buddies SET agreed='1' WHERE uid='".$who."' AND tid='".$uid."'"); if($res) { echo "\"o\"/$tnick Added to your buddy list successfully
"; }else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } } else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } }else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } }else if($todo="del") { $res= mysql_query("DELETE FROM ibwf_buddies WHERE (uid='".$uid."' AND tid='".$who."') OR (uid='".$who."' AND tid='".$uid."')"); if($res) { echo "\"o\"/$tnick removed from your buddy list
"; }else{ echo "\"x\"/can't remove $tnick from your buddy list
"; } } echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $unick = getnick_uid($uid); $tnick = getnick_uid($who); if($todo=="add") { if(budres($uid,$who)!=3){ if(arebuds($uid,$who)) { echo "\"x\"/$tnick is already your buddy
"; }else if(budres($uid, $who)==0) { $res = mysql_query("INSERT INTO ibwf_buddies SET uid='".$uid."', tid='".$who."', reqdt='".time()."'"); if($res) { echo "\"o\"/A request has been sent to $tnick
"; }else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } } else if(budres($uid, $who)==1) { $res = mysql_query("UPDATE ibwf_buddies SET agreed='1' WHERE uid='".$who."' AND tid='".$uid."'"); if($res) { echo "\"o\"/$tnick Added to your buddy list successfully
"; }else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } } else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } }else{ echo "\"x\"/You can't add $tnick to your buddy list
"; } }else if($todo="del") { $res= mysql_query("DELETE FROM ibwf_buddies WHERE (uid='".$uid."' AND tid='".$who."') OR (uid='".$who."' AND tid='".$uid."')"); if($res) { echo "\"o\"/$tnick removed from your buddy list
"; }else{ echo "\"x\"/can't remove $tnick from your buddy list
"; } } echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="upbmsg") { addonline(getuid_ses($ses),"Updating Buddy message",""); $bmsg = $_POST["bmsg"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET budmsg='".$bmsg."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Buddy message updated successfully
"; }else{ echo "\"x\"/can't update your buddy message
"; } echo "
"; echo ""; echo "Buddies List
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET budmsg='".$bmsg."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Buddy message updated successfully
"; }else{ echo "\"x\"/can't update your buddy message
"; } echo "
"; echo ""; echo "Buddies List
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="upav") { addonline(getuid_ses($ses),"Updating Avatar",""); $avid = $_GET["avid"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $avlnk = mysql_fetch_array(mysql_query("SELECT avlink FROM ibwf_avatars WHERE id='".$avid."'")); $res = mysql_query("UPDATE ibwf_users SET avatar='".$avlnk[0]."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Avatar Selected
"; }else{ echo "\"x\"/Database Error!
"; } echo "
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $avlnk = mysql_fetch_array(mysql_query("SELECT avlink FROM ibwf_avatars WHERE id='".$avid."'")); $res = mysql_query("UPDATE ibwf_users SET avatar='".$avlnk[0]."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Avatar Selected
"; }else{ echo "\"x\"/Database Error!
"; } echo "
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="upcm") { addonline(getuid_ses($ses),"Updating Chatmood",""); $cmid = $_GET["cmid"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET chmood='".$cmid."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Mood Selected
"; }else{ echo "\"x\"/Database Error!
"; } echo "
"; echo ""; echo "Chatrooms
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET chmood='".$cmid."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Mood Selected
"; }else{ echo "\"x\"/Database Error!
"; } echo "
"; echo ""; echo "Chatrooms
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="givegp") { addonline(getuid_ses($ses),"Giving Game credits",""); $who = $_GET["who"]; $ptg = $_POST["ptg"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $gpsf = mysql_fetch_array(mysql_query("SELECT gpoints FROM ibwf_users WHERE id='".$uid."'")); $gpst = mysql_fetch_array(mysql_query("SELECT gpoints FROM ibwf_users WHERE id='".$who."'")); if($gpsf[0]>=$ptg){ $gpsf = $gpsf[0]-$ptg; $gpst = $gpst[0]+$ptg; $res = mysql_query("UPDATE ibwf_users SET gpoints='".$gpst."' WHERE id='".$who."'"); if($res) { $res = mysql_query("UPDATE ibwf_users SET gpoints='".$gpsf."' WHERE id='".$uid."'"); echo "\"o\"/Game credits Updated Successfully
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"x\"/You don't have enough GPs to give
"; } echo "
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $gpsf = mysql_fetch_array(mysql_query("SELECT gpoints FROM ibwf_users WHERE id='".$uid."'")); $gpst = mysql_fetch_array(mysql_query("SELECT gpoints FROM ibwf_users WHERE id='".$who."'")); if($gpsf[0]>=$ptg){ $gpsf = $gpsf[0]-$ptg; $gpst = $gpst[0]+$ptg; $res = mysql_query("UPDATE ibwf_users SET gpoints='".$gpst."' WHERE id='".$who."'"); if($res) { $res = mysql_query("UPDATE ibwf_users SET gpoints='".$gpsf."' WHERE id='".$uid."'"); echo "\"o\"/Game credits Updated Successfully
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"x\"/You don't have enough GPs to give
"; } echo "
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="addcl") { addonline(getuid_ses($ses),"Adding Club",""); $clnm = trim($_POST["clnm"]); $clnm = str_replace("$", "", $clnm); $clds = trim($_POST["clds"]); $clds = str_replace("$", "", $clds); $clrl = trim($_POST["clrl"]); $clrl = str_replace("$", "", $clrl); $cllg = trim($_POST["cllg"]); $cllg = str_replace("$", "", $cllg); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; $uid = getuid_ses($ses); if(getcredits($uid)>=500) { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'")); if($noi[0]<3) { if(($clnm=="")||($clds=="")||($clrl=="")) { echo "\"X\"/Please be sure to fill, club name, description and rules"; }else{ $nmex = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE name LIKE '".$clnm."'")); if($nmex[0]>0) { echo "\"X\"/Club Name Already exist"; }else{ $res = mysql_query("INSERT INTO ibwf_clubs SET name='".$clnm."', owner='".$uid."', description='".$clds."', rules='".$clrl."', logo='".$cllg."', credits='0', created='".time()."'"); if($res) { $clid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_clubs WHERE owner='".$uid."' AND name='".$clnm."'")); echo "\"O\"/Congratulations! you have your own club, your own rules, message board, chatroom, announcements board, 50 club points also for you"; mysql_query("INSERT INTO ibwf_clubmembers SET uid='".$uid."', clid='".$clid[0]."', accepted='1', points='50', joined='".time()."'"); //$ups = getcredits($uid); //$ups += 5; //mysql_query("UPDATE ibwf_users SET credits='".$ups."' WHERE id='".$uid."'"); $fnm = $clnm; $cnm = $clnm; mysql_query("INSERT INTO ibwf_forums SET name='".$fnm."', position='0', cid='0', clubid='".$clid[0]."'"); mysql_query("INSERT INTO ibwf_rooms SET name='".$cnm."', pass='', static='1', mage='0', chposts='0', perms='0', censord='0', freaky='0', lastmsg='".time()."', clubid='".$clid[0]."'"); }else{ echo "\"X\"/Database Error!"; } } } }else{ echo "\"X\"/You already have 3 clubs"; } }else{ echo "\"X\"/You cant add clubs"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $uid = getuid_ses($ses); if(getcredits($uid)>=500) { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'")); if($noi[0]<3) { if(($clnm=="")||($clds=="")||($clrl=="")) { echo "\"X\"/Please be sure to fill, club name, description and rules"; }else{ $nmex = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE name LIKE '".$clnm."'")); if($nmex[0]>0) { echo "\"X\"/Club Name Already exist"; }else{ $res = mysql_query("INSERT INTO ibwf_clubs SET name='".$clnm."', owner='".$uid."', description='".$clds."', rules='".$clrl."', logo='".$cllg."', credits='0', created='".time()."'"); if($res) { $clid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_clubs WHERE owner='".$uid."' AND name='".$clnm."'")); echo "\"O\"/Congratulations! you have your own club, your own rules, message board, chatroom, announcements board, 50 club points also for you"; mysql_query("INSERT INTO ibwf_clubmembers SET uid='".$uid."', clid='".$clid[0]."', accepted='1', points='50', joined='".time()."'"); //$ups = getcredits($uid); //$ups += 5; //mysql_query("UPDATE ibwf_users SET credits='".$ups."' WHERE id='".$uid."'"); $fnm = $clnm; $cnm = $clnm; mysql_query("INSERT INTO ibwf_forums SET name='".$fnm."', position='0', cid='0', clubid='".$clid[0]."'"); mysql_query("INSERT INTO ibwf_rooms SET name='".$cnm."', pass='', static='1', mage='0', chposts='0', perms='0', censord='0', freaky='0', lastmsg='".time()."', clubid='".$clid[0]."'"); }else{ echo "\"X\"/Database Error!"; } } } }else{ echo "\"X\"/You already have 3 clubs"; } }else{ echo "\"X\"/You cant add clubs"; } echo "

\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="batp") { addonline(getuid_ses($ses),"Giving Game credits",""); $who = $_GET["who"]; $ptg = $_POST["ptbp"]; $giv = $_POST["giv"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_ses($ses)."'")); $gpst = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'")); if(ismod(getuid_ses($ses))||$judg[0]>0) { if ($giv=="1") { $gpst = $gpst[0]+$ptg; }else{ $gpst = $gpst[0]-$ptg; if($gpst<0)$gpst=0; } $res = mysql_query("UPDATE ibwf_users SET battlep='".$gpst."' WHERE id='".$who."'"); if($res) { $vnick = getnick_uid($who); if ($giv=="1") { $ms1 = " Added $ptg points to "; }else{ $ms1 = " removed $ptg points from "; } mysql_query("INSERT INTO ibwf_mlog SET action='bpoints', details='".getnick_uid(getuid_ses($ses))." $ms1 $vnick', actdt='".time()."'"); echo "\"o\"/Battle Points Updated Successfully
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"x\"/You can't do this
"; } echo "
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_ses($ses)."'")); $gpst = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'")); if(ismod(getuid_ses($ses))||$judg[0]>0) { if ($giv=="1") { $gpst = $gpst[0]+$ptg; }else{ $gpst = $gpst[0]-$ptg; if($gpst<0)$gpst=0; } $res = mysql_query("UPDATE ibwf_users SET battlep='".$gpst."' WHERE id='".$who."'"); if($res) { $vnick = getnick_uid($who); if ($giv=="1") { $ms1 = " Added $ptg points to "; }else{ $ms1 = " removed $ptg points from "; } mysql_query("INSERT INTO ibwf_mlog SET action='bpoints', details='".getnick_uid(getuid_ses($ses))." $ms1 $vnick', actdt='".time()."'"); echo "\"o\"/Battle Points Updated Successfully
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"x\"/You can't do this
"; } echo "
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="ign") { addonline(getuid_ses($ses),"Updating ignore list",""); $todo = $_GET["todo"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $tnick = getnick_uid($who); if($todo=="add") { if(ignoreres($uid, $who)==1) { $res= mysql_query("INSERT INTO ibwf_ignore SET name='".$uid."', target='".$who."'"); if($res) { echo "\"o\"/$tnick was added successfully to your ignore list
"; }else{ echo "\"x\"/Error Updating Database
"; } }else{ echo "\"x\"/You can't Add $tnick to your ignore list
"; } }else if($todo="del") { if(ignoreres($uid, $who)==2) { $res= mysql_query("DELETE FROM ibwf_ignore WHERE name='".$uid."' AND target='".$who."'"); if($res) { echo "\"o\"/$tnick was deleted successfully from your ignore list
"; }else{ echo "\"x\"/Error Updating Database
"; } }else{ echo "\"x\"/$tnick is not ignored by you
"; } } echo "
"; echo "Ignore List
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $tnick = getnick_uid($who); if($todo=="add") { if(ignoreres($uid, $who)==1) { $res= mysql_query("INSERT INTO ibwf_ignore SET name='".$uid."', target='".$who."'"); if($res) { echo "\"o\"/$tnick was added successfully to your ignore list
"; }else{ echo "\"x\"/Error Updating Database
"; } }else{ echo "\"x\"/You can't Add $tnick to your ignore list
"; } }else if($todo="del") { if(ignoreres($uid, $who)==2) { $res= mysql_query("DELETE FROM ibwf_ignore WHERE name='".$uid."' AND target='".$who."'"); if($res) { echo "\"o\"/$tnick was deleted successfully from your ignore list
"; }else{ echo "\"x\"/Error Updating Database
"; } }else{ echo "\"x\"/$tnick is not ignored by you
"; } } echo "
"; echo "Ignore List
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="uprof") { addonline(getuid_ses($ses),"Updating Settings",""); $savat = $_POST["savat"]; $semail = $_POST["semail"]; $usite = $_POST["usite"]; $ubday = $_POST["ubday"]; $uloc = $_POST["uloc"]; $usig = $_POST["usig"]; $usex = $_POST["usex"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Your profile was updated successfully
"; }else{ echo "\"x\"/Error updating your profile
"; } echo "
\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', site='".$usite."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', sex='".$usex."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Your profile was updated successfully
"; }else{ echo "\"x\"/Error updating your profile
"; } echo "
\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="shsml") { addonline(getuid_ses($ses),"Updating Smilies",""); $act = $_GET["act"]; $acts = ($act=="dis" ? 0 : 1); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET hvia='".$acts."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Smilies Visibility updated successfully
"; }else{ echo "\"x\"/Error updating your profile
"; } echo "
\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $res = mysql_query("UPDATE ibwf_users SET hvia='".$acts."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Smilies Visibility updated successfully
"; }else{ echo "\"x\"/Error updating your profile
"; } echo "
\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } else if($action=="upwd") { addonline(getuid_ses($ses),"Updating Settings",""); $npwd = $_POST["npwd"]; $cpwd = $_POST["cpwd"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); if($npwd!=$cpwd) { echo "\"x\"/Your Password and Confirm Password Doesn't match
"; }else if((strlen($npwd)<4) || (strlen($npwd)>15)){ echo "\"x\"/Your password should be between 4 and 15 letters only
"; }else{ $pwd = md5($npwd); $res = mysql_query("UPDATE ibwf_users SET pass='".$pwd."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Your password was updated successfully
"; }else{ echo "\"x\"/Error updating your password
"; } } echo "
\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); if($npwd!=$cpwd) { echo "\"x\"/Your Password and Confirm Password Doesn't match
"; }else if((strlen($npwd)<4) || (strlen($npwd)>15)){ echo "\"x\"/Your password should be between 4 and 15 letters only
"; }else{ $pwd = md5($npwd); $res = mysql_query("UPDATE ibwf_users SET pass='".$pwd."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Your password was updated successfully
"; }else{ echo "\"x\"/Error updating your password
"; } } echo "
\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } }else if($action=="dsp") { $view = $_POST["view"]; $theme = $_POST["theme"]; $sbox = $_POST["sbox"]; $icons = $_POST["icons"]; $font = $_POST["font"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "
"; $res = mysql_query("UPDATE ibwf_users SET view='".$view."', theme='".$theme."', sbox='".$sbox."', icons='".$icons."', font='".$font."' WHERE id='".$uid."'"); if($res) { echo "\"O\"/ Your Display Settings was successfully updated

"; }else{ echo "\"O\"/ MYSQL DATABASE ERROR!

"; } echo "\"*\"/CPanel
"; echo "\"*\"/"; echo "Home"; echo "
"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; $res = mysql_query("UPDATE ibwf_users SET view='".$view."', sbox='".$sbox."', icons='".$icons."', font='".$font."' WHERE id='".$uid."'"); if($res) { echo "\"O\"/ Your Display Settings was successfully updated

"; }else{ echo "\"O\"/ MYSQL DATABASE ERROR!

"; } echo "\"*\"/CPanel
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } }else if($action=="galav") { addonline(getuid_ses($ses),"Updating Avatar",""); $pid = $_GET["pid"]; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; //$uid = getuid_ses($ses); $avlnk = mysql_fetch_array(mysql_query("SELECT imgurl FROM ibwf_gallery WHERE id='".$pid."'")); $res = mysql_query("UPDATE ibwf_users SET avatar='".$avlnk[0]."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Avatar Updated
"; }else{ echo "\"x\"/Database Error!
"; } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; //$uid = getuid_ses($ses); $avlnk = mysql_fetch_array(mysql_query("SELECT imgurl FROM ibwf_gallery WHERE id='".$pid."'")); $res = mysql_query("UPDATE ibwf_users SET avatar='".$avlnk[0]."' WHERE id='".$uid."'"); if($res) { echo "\"o\"/Avatar Updated
"; }else{ echo "\"x\"/Database Error!
"; } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } }else if($action=="delgal") { addonline(getuid_ses($ses),"Removing gallery Photo","genproc.php?action=$action"); $pid = $_GET["pid"]; $uid = getuid_ses($ses); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if(!candelgal($uid, $pid)) { echo "\"x\"/This photo is not yours or you are not a moderator!"; }else{ $res = mysql_query("DELETE FROM ibwf_gallery WHERE id='".$pid."'"); $res = mysql_query("DELETE FROM ibwf_photocomments WHERE pid='".$pid."'"); $res = mysql_query("DELETE FROM ibwf_photorate WHERE pid='".$pid."'"); if($res) { echo "\"o\"/Photo Sucessfully removed
"; }else{ echo "\"x\"/Database Error!
"; } } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if(!candelgal($uid, $pid)) { echo "\"x\"/This photo is not yours or you are not a moderator!"; }else{ $res = mysql_query("DELETE FROM ibwf_gallery WHERE id='".$pid."'"); $res = mysql_query("DELETE FROM ibwf_photocomments WHERE pid='".$pid."'"); $res = mysql_query("DELETE FROM ibwf_photorate WHERE pid='".$pid."'"); if($res) { echo "\"o\"/Photo Sucessfully removed
"; }else{ echo "\"x\"/Database Error!
"; } } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } }else if($action=="addpcom") { addonline(getuid_ses($ses),"Adding Photo Comment","genproc.php?action=$action"); $pid = $_GET["pid"]; $text = $_POST["text"]; $uid = getuid_ses($ses); $crdate = time(); $res = false; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if(!photoowner($uid, $pid)) { if(trim($text)!="") { $res = mysql_query("INSERT INTO ibwf_photocomments SET text='".$text."', byuser='".$uid."', time='".$crdate."', pid='".$pid."'"); } if($res) { echo "\"O\"/Comment Added Successfully
"; }else{ echo "\"X\"/Error Adding Comment"; } }else{ echo "\"X\"/You Cannot comment on your own photo!"; } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if(!photoowner($uid, $pid)) { if(trim($text)!="") { $res = mysql_query("INSERT INTO ibwf_photocomments SET text='".$text."', byuser='".$uid."', time='".$crdate."', pid='".$pid."'"); } if($res) { echo "\"O\"/Comment Added Successfully
"; }else{ echo "\"X\"/Error Adding Comment"; } }else{ echo "\"X\"/You Cannot comment on your own photo!"; } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } }else if($action=="delcmt") { addonline(getuid_ses($ses),"Removing Photo Comment","genproc.php?action=$action"); $pcid = $_GET["pcid"]; $uid = getuid_ses($ses); if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if(photoowner($uid, $pid)||ismod($uid)) { $res = mysql_query("DELETE FROM ibwf_photocomments WHERE id ='".$pcid."'"); if($res) { echo "\"O\"/Comment removed Successfully
"; }else{ echo "\"X\"/Error removing Comment"; } }else{ echo "\"X\"/Photo comments arent assigned to your photo"; } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if(photoowner($uid, $pid)||ismod($uid)) { $res = mysql_query("DELETE FROM ibwf_photocomments WHERE id ='".$pcid."'"); if($res) { echo "\"O\"/Comment removed Successfully
"; }else{ echo "\"X\"/Error removing Comment"; } }else{ echo "\"X\"/Photo comments arent assigned to your photo"; } echo "
"; echo "\"*\"/Gallery
"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } }else if($action=="prate") { addonline(getuid_ses($ses),"Rating User Photo","index.php?action=$action"); $pid = $_GET["pid"]; $prate = $_POST["prate"]; $uid = getuid_ses($ses); $stitle = "View User"; if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; if(photoowner($uid, $pid)) { echo "You cant rate your own Photo!
"; }else{ $vb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_photorate WHERE uid='".$uid."' AND pid='".$pid."'")); if($vb[0]==0) { $res = mysql_query("INSERT INTO ibwf_photorate SET uid='".$uid."', pid='".$pid."', prate='".$prate."'"); if($res) { echo "\"0\"/ You have successfully rated this photo. your vote will be counted!"; }else{ echo "\"x\"/ MYSQL ERROR!"; } }else{ echo "You have already rated this Photo!
"; } } echo "

"; echo "

"; echo "\"*\"/Gallery
"; echo "\"*\"/Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; if(photoowner($uid, $pid)) { echo "You cant rate your own Photo!
"; }else{ $vb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_photorate WHERE uid='".$uid."' AND pid='".$pid."'")); if($vb[0]==0) { $res = mysql_query("INSERT INTO ibwf_photorate SET uid='".$uid."', pid='".$pid."', prate='".$prate."'"); if($res) { echo "\"0\"/ You have successfully rated this photo. your vote will be counted!"; }else{ echo "\"x\"/ MYSQL ERROR!"; } }else{ echo "You have already rated this Photo!
"; } } echo "

"; echo "

"; echo "\"*\"/Gallery
"; echo "\"*\"/Home"; echo "

"; echo wapfoot(); } }else if($action=="url") { $submit = $_POST['submit']; if($mime== WEB) { echo webhead($uthm,$stitle); if ($submit=="1") { if (!$defaultDest) { $defaultDest = 'gallery'; } if (!file_exists($defaultDest)) { mkdir($defaultDest); } $sizelimit = $sizelimit * 1024; $img1 = $_POST['img1']; $uploadfile = explode('/', $img1); $filename = array_pop($uploadfile); $newfilename = $_POST['new']; if (!$newfilename) { $newfilename = $filename; } if (!isset($img1)) { echo '

Please enter a URL to retrieve file from

'; $error = true; } if (!isset($newfilename)) { echo '

Please enter a new file name!

'; $error = true; } if ($error == false) { $dest = $defaultDest; $ds = array($dest, '/', $newfilename); $ds = implode('', $ds); $newname_count = 0; if (file_exists($ds)) { echo '

File already exists!

'; $newname_count++; $newfile = array($newname_count, $newfilename); $newfile = implode('~', $newfile); $newfile_ds = array($dest, '/', $newfile); $newfile_ds = implode('', $newfile_ds); while($renamed == false) { if (file_exists($newfile_ds)) { $newname_count++; $newfile = array($newname_count, $newfilename); $newfile = implode('~', $newfile); $newfile_ds = array($dest, '/', $newfile); $newfile_ds = implode('', $newfile_ds); } else { $renamed = true; } } $newfilename = $newfile; $ds = $newfile_ds; echo '

New file name is '.$newfile.'.

'; } echo '

Copying...

'; if ($snatch_system == 'curl') { $ch = curl_init($file); $fp = fopen($ds, 'w'); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); $curl_info = curl_getinfo($ch); curl_close($ch); fclose($fp); } else { if (!copy($file, $ds)) { echo '

Was unable to copy '.$file.'
See if your path and destination are correct.

'; $copy_fail = true; } } if ($copy_fail == false) { if ($sizelimit > 0 && filesize($ds) > $sizelimit) { echo '

File is too large.'; unlink($ds); } else { echo '

Copy successful!

'; echo '

Click here for file

'; $usex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'")); $sex = $usex[0]; $res = mysql_query("INSERT INTO ibwf_gallery SET uid='";.$uid."', sex='".$sex."', imgurl='".$newfilename."'"); if ($snatch_system == 'curl') { $size_dl = round($curl_info['size_download']/1024, 2); $speed_dl = round($curl_info['speed_download']/1024, 2); echo '

Downloaded '.$size_dl.'KB in '.$curl_info['total_time'].' seconds.
With an average download speed of '.$speed_dl.'KB/s.'; } } } } } echo "

"; echo "

\"*\"/Gallery
"; echo "\"*\"/Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); if ($submit=="1") { if (!$defaultDest) { $defaultDest = 'gallery'; } if (!file_exists($defaultDest)) { mkdir($defaultDest); } $sizelimit = $sizelimit * 1024; $img1 = $_POST['img1']; $uploadfile = explode('/', $img1); $filename = array_pop($uploadfile); $newfilename = $_POST['new']; if (!$newfilename) { $newfilename = $filename; } if (!isset($img1)) { echo '

Please enter a URL to retrieve file from

'; $error = true; } if (!isset($newfilename)) { echo '

Please enter a new file name!

'; $error = true; } if ($error == false) { $dest = $defaultDest; $ds = array($dest, '/', $newfilename); $ds = implode('', $ds); $newname_count = 0; if (file_exists($ds)) { echo '

File already exists!

'; $newname_count++; $newfile = array($newname_count, $newfilename); $newfile = implode('~', $newfile); $newfile_ds = array($dest, '/', $newfile); $newfile_ds = implode('', $newfile_ds); while($renamed == false) { if (file_exists($newfile_ds)) { $newname_count++; $newfile = array($newname_count, $newfilename); $newfile = implode('~', $newfile); $newfile_ds = array($dest, '/', $newfile); $newfile_ds = implode('', $newfile_ds); } else { $renamed = true; } } $newfilename = $newfile; $ds = $newfile_ds; echo '

New file name is '.$newfile.'.

'; } echo '

Copying...

'; if ($snatch_system == 'curl') { $ch = curl_init($file); $fp = fopen($ds, 'w'); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); $curl_info = curl_getinfo($ch); curl_close($ch); fclose($fp); } else { if (!copy($file, $ds)) { echo '

Was unable to copy '.$file.'
See if your path and destination are correct.

'; $copy_fail = true; } } if ($copy_fail == false) { if ($sizelimit > 0 && filesize($ds) > $sizelimit) { echo '

File is too large.'; unlink($ds); } else { echo '

Copy successful!

'; echo '

Click here for file

'; $usex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'")); $sex = $usex[0]; $res = mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', sex='".$sex."', imgurl='".$newfilename."'"); if ($snatch_system == 'curl') { $size_dl = round($curl_info['size_download']/1024, 2); $speed_dl = round($curl_info['speed_download']/1024, 2); echo '

Downloaded '.$size_dl.'KB in '.$curl_info['total_time'].' seconds.
With an average download speed of '.$speed_dl.'KB/s.'; } } } } } echo "

"; echo "

\"*\"/Gallery
"; echo "\"*\"/Home"; echo "

"; echo wapfoot(); } }else{ if($mime== WEB) { echo webhead($uthm,$stitle); echo "

"; echo "I don't know how did you get into here, but there's nothing to show

"; echo "\"*\"/"; echo "Home"; echo "

"; echo webfoot(); }else{ echo waphead($stitle); echo "

"; echo "I don't know how did you get into here, but there's nothing to show

"; echo "\"*\"/"; echo "Home"; echo "

"; echo wapfoot(); } } ?>